#include "Bullet.h"

Bullet::Bullet(XY startPos, float fireAngle)
{

	life = 5.0; //let's say they last
	pos = startPos;
//	Velocity.x = 3; //let's set 3 as native velocity
//	Velocity.y = 0;

	SetMagAccordingToAngleXY(Velocity, fireAngle, 150);
	//SetRotationXY(Velocity, fireAngle);
}

XY Bullet::GetPos()
{ return pos; } 

void Bullet::Die()
{ life = -1; } 

bool Bullet::IsDead()
{ return life <= 0 ; }

void Bullet::Update(float deltaTime)
{ 
	life -=  deltaTime; 
	Entity::Update(deltaTime); 
} ;